package com.hx.er.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.hx.er.bean.base.FoodBean;
import com.hx.er.bean.base.LabelBean;
import com.hx.er.bean.detail.FoodDetailBean;
import com.hx.er.bean.detail.LabelDetailBean;
import com.hx.er.dao.IFoodDao;
import com.hx.er.mapper.IFoodMapper;

public class FoodDaoImpl implements IFoodDao {
	@Autowired
	private IFoodMapper foodMapper;

	@Override
	public List<FoodBean> getFoodAliveList(Map<String, Object> conditions) {
		return this.foodMapper.getFoodAliveList(conditions);
	}

	@Override
	public void insertFoodWithoutId(FoodBean foodBean) {
		this.foodMapper.insertFoodWithoutId(foodBean);
	}

	@Override
	public int getFoodAliveCount(Map<String, Object> conditions) {
		return this.foodMapper.getFoodAliveCount(conditions);
	}

	@Override
	public FoodDetailBean getFoodAliveById(long foodId) {
		return this.foodMapper.getFoodAliveById(foodId);
	}

	@Override
	public int deleteFood(FoodBean foodBean) {
		return this.foodMapper.deleteFood(foodBean);
	}

	@Override
	public int updateFood(FoodBean foodBean) {
		return this.foodMapper.updateFood(foodBean);
	}

	@Override
	public void insertLabelWithoutId(LabelBean labelBean) {
		this.foodMapper.insertLabelWithoutId(labelBean);
	}

	@Override
	public List<LabelDetailBean> getLabelDetailAliveList(Map<String, Object> conditions) {
		return this.foodMapper.getLabelDetailAliveList(conditions);
	}

	@Override
	public int deleteLabel(LabelBean labelBean) {
		return this.foodMapper.deleteLabel(labelBean);
	}

	@Override
	public int updateLabel(LabelBean labelBean) {
		return this.foodMapper.updateLabel(labelBean);
	}

	@Override
	public int updateLabelSort(LabelBean labelBean) {
		return this.foodMapper.updateLabelSort(labelBean);
	}

	@Override
	public FoodDetailBean getLastAliveFood(FoodBean foodBean) {
		return this.foodMapper.getLastAliveFood(foodBean);
	}

	@Override
	public FoodDetailBean getNextAliveFood(FoodBean foodBean) {
		return this.foodMapper.getNextAliveFood(foodBean);
	}

	@Override
	public int updateFoodSort(FoodBean foodBean) {
		return this.foodMapper.updateFoodSort(foodBean);
	}

	@Override
	public int getLabelDetailAliveCount(Map<String, Object> conditions) {
		return this.foodMapper.getLabelDetailAliveCount(conditions);
	}

	@Override
	public LabelDetailBean getLabelDetailAliveById(long labelId) {
		return this.foodMapper.getLabelDetailAliveById(labelId);
	}

}
